package com.feign.client;

import com.feign.config.FeignConfig;
import com.feign.entity.Params;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.cloud.openfeign.SpringQueryMap;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;

import java.util.Map;

/**
 * @作者: 林江
 * @创建时间: 2023/10/27
 * @功能:
 */
@FeignClient(
        value = "nacos-provider",
        configuration = FeignConfig.class,
        fallback = NacosConsumerFallback.class
)
public interface NacosConsumerClient {

    @RequestMapping("/test")
    String test();

    @RequestMapping("/test01")
    String test01(@SpringQueryMap Params params);

    @PostMapping(value = "/test02")
    Map test02(@RequestBody Params params);

    @GetMapping("/test03")
    String test03();
}
